require(["common", "hash_routie", "/js/common/goodsCart.js"], function (jSouper, hash_routie, goodsCart) {
	hash_routie({
		html_url: "./pages/catering/mobile/",
		js_url: "./js/catering/mobile/",
		hash_prefix: "default/:page",
		default_hash: "main",
		use_css: "./css/mobile.main.css",
		teleporter: "main"
	});

	function _get_cart_success(result) {
		var cart_detail = result.result;
		App.set("user.cart_detail", cart_detail);
		// href.jump("/mobile.main.html#default/cart");
	};

	App.set("$Event.goods_list.add_to_cart", function (e, vm) {
		var cart_item = {
			goods_id: vm.get("_id"),
			num: 1
		};
		goodsCart.add_to_cart(vm.get("_id"), 1, _get_cart_success);
	});
});